import requests
# ihrmd登录接口代码封装实现：
class Get_token:
    def get_token(self):
        response=requests.post(url='http://ihrm2-test.itheima.net/api/sys/login',
                               headers={"Content-type":"application/json"},json={
                "mobile":"13800000002",
                "password":"123456"
            })
        token=response.json()["data"]
        return {"Authorization":token}

# response返回数据
# {'success': True, 'code': 10000, 'message': '操作成功！', 'data': '7d0b3dee-c7f5-48f8-b168-9315d3814546'}